using System;

namespace FluentTests.Framework.Verbs
{
    public interface IVerb
    {
        bool Negated { get; }
        object ActualValue { get; }
        IAssertionProvider AssertionProvider { get; }
    }

    public abstract class Verb<T> : IVerb
    {
        private bool negated;

        protected Verb(EnsuredWrapper<T> ensuredWrapperObject)
        {
            this.EnsuredWrapperObject = ensuredWrapperObject;
        }

        public bool Negated
        {
            get { return negated; }
            protected set { negated = value; }
        }


        internal EnsuredWrapper<T> EnsuredWrapperObject { get; set; }

        public object ActualValue { get { return EnsuredWrapperObject.ActualValue; } }

        public IAssertionProvider AssertionProvider
        {
            get { return EnsuredWrapperObject.AssertionProvider; }
        }
    }


    public interface IIs : IVerb
    {
        
    }

    public class Is<T> : Verb<T>, IIs
    {
        public Is(EnsuredWrapper<T> ensuredWrapperObject)
            : base(ensuredWrapperObject)
        {
        }

        public Is<T> Not
        {
            get
            {
                this.Negated = !this.Negated;
                return this;
            }
        }

    }


}